The logic of demand in Haskell
نویسندگان
چکیده
Haskell is a functional programming language whose evaluation is lazy by default. However, Haskell also provides pattern matching facilities which add a modicum of eagerness to its otherwise lazy default evaluation. This mixed or “non-strict” semantics can be quite difficult to reason with. This paper introduces a programming logic, P-logic, which neatly formalizes the mixed evaluation in Haskell pattern-matching as a logic, thereby simplifying the task of specifying and verifying Haskell programs. In P-logic, aspects of demand are reflected or represented within both the predicate language and its model theory, allowing for expressive and comprehensible program verification.
منابع مشابه
Reflecting Demand in Programming Logics: a case study for Haskell
Haskell is a functional programming language whose evaluation is lazy by default. However, Haskell also provides pattern matching facilities which add a modicum of eagerness to its otherwise lazy default evaluation. This mixed or “non-strict” semantics can be quite difficult to reason with. This paper introduces a programming logic, P-logic, which neatly formalizes the mixed evaluation in Haske...
متن کاملFrequency Control of an Islanded Microgrid based on Intelligent Control of Demand Response using Fuzzy Logic and Particle Swarm Optimization (PSO) Algorithm
Due to the increasing penetration of renewable energies in the power system, the frequency control problem has attracted more attention, while the traditional control methods are not capable of regulating the frequency and securing the stability of the system. In smart grids, demand response as the frequency control tool reduces the dependence on spinning reserve and high cost controllers. In a...
متن کاملAnalysing Price, Quality and Lead Time Decisions with the Hybrid Solution Method of Fuzzy Logic and Genetic Algorithm
In this paper, the problem of determining the quality level, lead time for order delivery and price of a product produced by a manufacturer is considered. In this problem the demand for the product is influenced by all three decision variables: price, lead time and quality level. To formulate the demand function, a fuzzy rule base that estimates the demand value based on the three decision vari...
متن کاملA multi-period distribution network design model under demand uncertainty
Supply chain management is taken into account as an inseparable component in satisfying customers' requirements. This paper deals with the distribution network design (DND) problem which is a critical issue in achieving supply chain accomplishments. A capable DND can guarantee the success of the entire network performance. However, there are many factors that can cause fluctuations in input dat...
متن کاملEfficient Compilation of Guarded Join-Patterns via Parallel Implementation of Constraint Handling Rules
Parallelism is going mainstream and the demand for programs that scales well with parallelism will become ever more stronger. Hence to develope parallel programs of increasing complexity, comprehensive and efficient high level concurrency abstractions would soon become a necessity in existing mainstream programming languages. Our approach extends from a promising high-level concurrency abstract...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Funct. Program.
دوره 15 شماره
صفحات -
تاریخ انتشار 2005